<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>多语言翻译类型</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/jquery.min.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/easyui.comm.valid.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui1.7.0/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../../assets/easyui/easyui.grid.hide.js"></script>
    <script type="text/javascript" src="../../js/easyui/Common.js"></script>
    <script type="text/javascript" src="../../js/easyui/comm.dict.js"></script>
    <script type="text/javascript" src="../../js/easyui/DateUtils.js"></script>
    <link rel="stylesheet" type="text/css" href="../../assets/easyui/easyui1.7.0/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="../../assets/easyui/easyui1.7.0/themes/icon.css">

    <style type="text/css">
        #fm {
            margin: 0;
            padding: 10px 20px;
        }

        .ftitle {
            font-size: 14px;
            font-weight: bold;
            padding: 5px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #ccc;
        }

        .fitem {
            margin-bottom: 5px;
        }

        .fitem label {
            display: inline-block;
            width: 60px;
        }

        .input_query {
            width: 80px;
        }

        input, textarea {
            width: 160px;
            border: 1px solid #ccc;
            padding: 2px;
        }
    </style>
</head>

<body>
<div id="dialog"  class="easyui-dialog" closed="true"></div>
<div class="easyui-layout" data-options="fit:true">
    <!-- 查询条件  -->
    <div data-options="region:'north', title:'多语言翻译类型-条件'"
         style="height: 80px; padding: 5px 10px;display:none;">
        <form id="search-form" class="form-inline" style="float:left">
            <div class="form">
                <div class="input-group">
                    <input type="text" id="query_code" name="code" data-options="prompt:'类型'" class="easyui-textbox">
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-search'" id="search-btn">查询</a>
                    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload'" id="reset-btn">重置</a>
                </div>
            </div>
        </form>
    </div>

    <!-- 查询结果 center -->
    <div data-options="region:'center', title:'查询结果'">
        <div id="toolbar" style="display:none;">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true"
               onclick="onAdd()">新增</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="onEdit()">修改</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true"
               onclick="onDestroy()">删除</a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-search"  onclick="transTypeCount()">翻译类型数统计</a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-search"  onclick="transCounts()">使用量统计</a>
        </div>
        <table id="dg" class="easyui-datagrid"
               data-options="onDblClickRow:onDblClick, onClickRow:onClick, onLoadError:loadError, onLoadSuccess:function(){$('.datagrid-btable').find('div.datagrid-cell').css('text-align','left');}"
               toolbar="#toolbar" pagination="true" sortName="createTime" sortOrder="desc"
               rownumbers="true" fitColumns="true" singleSelect="true" style="display:none;">
            <thead>
            <tr>
                <th align="center" field="id" width="50" sortable="true" hidden="true">主键</th>
                <th align="center" field="code" width="50" sortable="true">编码</th>
                <th align="center" field="name" width="50" sortable="true">名称</th>
                <th align="center" field="typeCode" width="50" sortable="true">类型编码</th>
                <th align="center" field="idField" width="50" sortable="true" hidden="true">id属性名</th>
                <th align="center" field="idType" width="50" sortable="true" hidden="true">id属性类型</th>
                <th align="center" field="remark" width="50" sortable="true" hidden="true">备注</th>
                <th align="center" field="status" width="50" sortable="true" data-options="formatter: function(value,row,index){
                                return formatterCombobox(dict_status, value, false);
                            }">状态
                </th>
                <th align="center" field="ifDel" width="50" sortable="true" hidden="true">是否删除</th>
                <th align="center" field="createTime" width="50" sortable="true">创建时间</th>
                <th align="center" field="updateTime" width="50" sortable="true" hidden="true">更新时间</th>
                <th align="center" field="createUser" width="50" sortable="true" hidden="true">创建人</th>
                <th align="center" field="updateUser" width="50" sortable="true" hidden="true">修改人</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div id="dlg" class="easyui-dialog" style="width:400px;height:500px;padding:5px 10px;display:none;"
     closed="true" buttons="#dlg-buttons">
    <form id="fm" method="post" novalidate>
        <input type="hidden" name="id">
        <input type="hidden" name="ifDel">
        <div class="fitem">
            <label>编码:</label>
            <input name="code" class="easyui-validatebox" required="true">
        </div>
        <div class="fitem">
            <label>名称:</label>
            <input name="name" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>类型编码:</label>
            <input name="typeCode" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>id属性名:</label>
            <input name="idField" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>id属性类型:</label>
            <input name="idType" class="easyui-validatebox">
        </div>
        <div class="fitem">
            <label>状态:</label>
            <input class="easyui-combobox" name="status" required="true"
                   data-options="valueField:'id',textField:'name',data: dict_status"/>
        </div>
        <div class="fitem">
            <label>备注:</label>
            <textarea name="remark" style="height:60px;width:220px"></textarea>
        </div>
    </form>
    <div id="dlg-buttons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="onSave()">Save</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
           onclick="javascript:$('#dlg').dialog('close')">Cancel</a>
    </div>
</div>

<script type="text/javascript" src="trTransType.js"></script>
</body>
</html>